<?php

declare (strict_types=1);

namespace app\shop\service\store;

use app\admin\model\store\User as StoreUserModel;
use app\common\service\shop\User as UserService;

/**
 * 商家用户服务类
 * Class User
 * @package app\store\service\store
 */
class User extends UserService
{
    /**
     * 获取指定商城的管理员用户信息
     * @param int $storeId
     * @return StoreUserModel|array|null
     */
    public static function getUserInfoByShopId(int $shopId)
    {
        return StoreUserModel::detail([
            ['shop_id', '=', $shopId],
            ['is_super', '=', 1]
        ]);
    }
}
